Carbon


IdentifyFolder

Header: Folders.h Carbon status: Supported

Obtains the folder type for the specified folder.

OSErr IdentifyFolder (
    SInt16 vRefNum, 
    SInt32 dirID, 
    FolderType *foldType
);
Parameter descriptions
vRefNum

Pass the volume reference number (or the constant kOnSystemDisk for the startup disk) of the volume containing the folder whose type you wish to identify.

dirID

Pass the directory ID number for the folder whose type you wish to identify.

foldType

Pass a pointer to a value of type FolderType. On return, the value is set to the folder type of the folder with the specified vRefNum and dirID parameters; see “Folder Type Constants” for descriptions of possible values.

function result

A result code.

DISCUSSION

The folder type is identified for the folder specified by the vRefNum and dirID parameters, if such a folder exists. Note that IdentifyFolder may take several seconds to complete. Note also that if there are multiple folder descriptors that map to an individual folder, IdentifyFolder returns the folder type of only the first matching descriptor that it finds.

VERSION NOTES

This function is supported under Mac OS 8 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)